<!--#include file="./doctype.html"-->
<title>管理员管理-<%=siteTitle%>-后台管理</title>
</head><body>
<div class="wrap">
    <ol class="breadcrumb">
        <li class="active"><a href="<%=fileName%>">列表首页</a></li>
    </ol>
	<form method="get" action="<%=fileName%>" class="form-inline mb10" role="form">
		<input type="hidden" value="index" name="q">
		<div class="form-group ml15 mr15">
            <label for="ip">IP关键字：</label>
            <input type="text" class="form-control input-sm clean" id="ip" name="ip" value="<%=app.hec(ip)%>" placeholder="IP关键字">
        </div>
        <button type="submit" class="btn btn-sm btn-primary">确定</button>
	</form>
	<%
	if isArray(data) then
	    %>
		<table class="table table-bordered">
			<thead>
				<tr>
					<th>id</th>
					<th>登录名</th>
					<th>昵称</th>
					<th>最后登录IP</th>
					<th>最后登录时间</th>
					<th>登录次数</th>
					<th>启用？</th>
					<th>超管？</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
			<%
			dim isStop
			for i = 0 to ubound(data, 2)
				Tid = data(0,i)
				isStop = app.cj_bool(data(7,i))
			    if adminInfo(0) = Tid then
                %>
                <tr class="danger"><td><%=Tid%></td>
                <% else %>
                <tr>
                    <td>
                        <label><input type="checkbox" name="batchId" value="<%=Tid%>" /> <%=Tid%></label>
                    </td>
                <% End if %>
                <td><a href="<%=fileName%>?q=edit&id=<%=Tid%>"><%=data(1,i)%></a></td>
                <td><%=app.hec(data(2,i))%></td>
                <td><%=data(3,i)%></td>
                <td><%=data(4,i)%></td>
                <td>
                    <span title="详细" class="btn btn-xs text-primary pull-right" onclick="$('#logs_<%=Tid%>').slideToggle()">
                    <i class="glyphicon glyphicon-list"></i>
                    </span>
                    <%=data(5,i)%>
                </td>
                <td class="setBool" data-value="<%=data(7,i)%>"></td>
                <td class="setBool1" data-value="<%=data(8,i)%>"></td>
                <td>
                	<% if isSuper and adminInfo(0) <> Tid then%>
						<% if isStop then%>
							<span title="启用" class="btn btn-xs text-success statusOne" data-id="<%=Tid%>" data-status="0">
							    <i class="glyphicon glyphicon-ok"></i>
							</span>
						<% else %>
							<span title="禁用" class="btn btn-xs text-danger statusOne" data-id="<%=Tid%>" data-status="1">
							    <i class="glyphicon glyphicon-remove"></i>
							</span>
						<% End if %>
						<span title="删除" class="btn btn-xs text-danger deleteOne" data-id="<%=Tid%>">
						    <i class="glyphicon glyphicon-trash"></i>
						</span>
                	<% End if %>
                </td>
				</tr>
                <tr class="text-left dn" id="logs_<%=Tid%>">
                    <td colspan="9"><%=replace(data(6,i), chr(13), "<br>")%></td>
                </tr>
			<% next %>
			</tbody>
		</table>
		<!--#include file="page.html"-->
	<% else %>
		<!--#include file="noData.html"-->
	<% End if %>
    <!--#include file="loadTime.html"-->
</div>
<script>
$(document).ready(function(){
    $('.setBool').setBool(0);
    $('.setBool1').setBool(1);
$(this)
	.on('click', '.deleteOne', function() {
		$(this).deleteOne();
	})
	.on('click', '.statusOne', function() {
		$(this).statusOne();
	})
});
</script>
</body>
</html>